<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    /*到此一游*/
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: rgba(115, 125, 131, 0.815);
        }

        .one {
            height: 540px;
            width: 605px;
            /* border: 1px solid black; */
            position: relative;
            margin-top: 100px;
            margin-left: 50%;
            left: -300px;
            /* display: flex; */
            display: inline-block;
        }

        .mid{
            position: relative;
            width: 600px;
            display: flex;
            justify-content: space-evenly;
        }

        .two{
            width: 400px;
            height: 512px;
            transition: .4s;
            background-size: cover;
            margin-right: 10px;
        }
        .three{
            width: 200px;
            height: 500px;
            display: flex;
            flex-direction: column;
            justify-content:space-between;
        }

        .four{
            position: relative;
            width: 200px;
            height: 90px;
            right: 0;
            top: 5px;
            transition: .5s;
            overflow: hidden;
        }

        .four img{
            position: absolute;
            width: 200px;
            transform: translate(0,-50px);
            transition: .5s;
            right: 0;
        }
        .set{
            opacity: 0;
            right: 250px;
        }

        .four:hover img{
            opacity: 0;
            right: 250px;
        }

        ul{
            display: inline-block;
            position: relative;
            margin-left: 80%;
            top: -100px;
            list-style: none;
            color: rgb(255, 255, 255);
            font-size: 20px;
            font-weight: bold; 
        }

        a{
            text-decoration: none;
            color: white;
            }

        li:hover{
            color: rgba(218, 212, 203, 0.733);
        }

        a:hover{
            color: rgba(218, 212, 203, 0.733);
        }

        .word{
            height: 150px;
            width: 300px;
            /* border: 1px solid black; */
            position: absolute;
            left: -50%;
            top: 30%;
        }

        h1{
            color: white;
            font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
        }

        p{
            color: white;
            font-size: 20px;
            font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
        }

        p:hover{
            color: rgba(218, 212, 203, 0.733);
        }

        h1:hover{
            color: rgba(218, 212, 203, 0.733);
        }
    </style>
</head>

<body>
    <div class="one">
        <div class="word">
            <h1>My Page</h1>
            <br><br>
            <p>This world may be rough around the edges,but it's got its charms.</p>
        </div>
        <div class="mid">
            <div class="two"></div>
            <div class="three">
                <div class="four"><img src="images/1.jpg" alt=""></div>
                <div class="four"><img src="images/2.jpg" alt=""></div>
                <div class="four"><img src="images/3.jpg" alt=""></div>
                <div class="four"><img src="images/4.jpg" alt=""></div>
            </div>
        </div>
    </div>

    <ul>
        <li >source:</li>
        <li><a href="www.instagram.com" target="_blank">pictures are from artist NOMA</a></li>
    </ul>

    <script>
        var two=document.querySelector('.two')
        var four = document.querySelectorAll('img');
        var time;
        var i=0;
    
        j=0;
    
                four[0].onmousemove = function(){
                    two.style.backgroundImage = "url('images/1.jpg')";
    
                }
                four[1].onmousemove = function(){
                    two.style.backgroundImage = "url('images/2.jpg')";
    
                }
                four[2].onmousemove = function(){
                    two.style.backgroundImage = "url('images/3.jpg')";
    
                }
                four[3].onmousemove = function(){
                    two.style.backgroundImage = "url('images/4.jpg')";
    
                }
                i=0;
        function c(){
            time = setInterval(function(){
                i++;
                two.style.backgroundImage = "url('images/"+[i]+".jpg')"
    
                if(i==4){
                    i=0;
                }
            },1500);
        }
    
        c();
    </script>
</body>


</html>
